local variables vs global variables in shell scripting